package com.java.multipledatasource.controller;

import com.java.multipledatasource.spring.test.CSVUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author hu
 * @version 1.0
 * @date 2020/12/2 0002 下午 12:43
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @RequestMapping("/csv")
    public void test(HttpServletRequest request, HttpServletResponse response) {
        CSVUtils.exportCsv(response, request);
    }
}
